Setup and Share Python Environment Using Pixi
How-To
SWE
Python Path
Author
Jane
Published
June 6, 2027
How to Set Up and Share a Python Environment Using Pixi
Goal
Set up a reproducible Python environment using Pixi and share it with others via pixi.toml
and pixi.lock
.
Step 1: Install Pixi
- Go to the official Pixi installation page.
- On Windows, run:
- Verify installation:
Step 2: Initialize a Pixi Environment
This command creates a pixi.toml
file in the current directory.
Step 3: Add Python and pip
This installs Python and pip from the conda-forge
ecosystem.
Step 4: Enter the Environment
You are now inside the managed environment.
Step 5: Add Packages
Example:
Or from PyPI:
Step 6: Share the Environment
- Commit or send the
pixi.toml
andpixi.lock
files. - Others can recreate the same environment by running:
Summary
You have successfully created and shared a Python environment using Pixi.